import * as echarts from "echarts"
let symbolSize = 5;
let option = {
  visualMap: [
    {
      type:'continuous',
      calculable: true,
      inRange: {
        color: ['#409eff','#0000ff','#F08080', '#FF7F50','#ff0000']
      },
      show: true,
      textStyle: {
        color: '#000',
        fontSize: 11
      },
      dimension: 0,
      left:10,
      textGap:20,
    },
    {
      type:'piecewise',
      calculable: true,
      inRange: {
        color: ['#409eff','#0000ff','#F08080', '#FF7F50','#ff0000']
      },
      show: true,
      textStyle: {
        color: '#000',
        fontSize: 11
      },
      dimension: 0,
      left:80,
      textGap:20,
    },
    // {
    //   calculable: true,
    //   inRange: {
    //     color: ['#00ff00', '#ff0000']
    //   },
    //   show: true,
    //   textStyle: {
    //     color: '#000',
    //     fontSize: 11
    //   },
    //   dimension: 1,
    //   left:150,
    //   textGap:20,
    // },
    // {
    //   calculable: true,
    //   inRange: {
    //     color: ['#00ff00', '#ff0000']
    //   },
    //   show: true,
    //   textStyle: {
    //     color: '#000',
    //     fontSize: 11
    //   },
    //   dimension: 1,
    //   left:150,
    //   textGap:20,
    // }
  ],
  grid3D: {},
  xAxis3D: {
    type: 'category'
  },
  yAxis3D: {},
  zAxis3D: {},
  dataset: {
    dimensions: [],
    source: [] as any[]
  },
  tooltip: {},

  series: [
    {
      type: 'scatter3D',
      name: '',
      symbolSize: symbolSize,
      // itemStyle: {  scatter3d 文档，这里不支持函数！！！
      //   color: function (params) {
      //     return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
      //       offset: 0,
      //       color: '#409eff'
      //     }, {
      //       offset: 1,
      //       color: '#ffffff'
      //     }]);
      //   }
      // },
      encode: {
        x: 'x',
        y: 'y',
        z: 'z',
        tooltip: [0, 1, 2, 3, 4, 5]
      },
    }
  ]
};

export default option